<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>RVM : Using Distributed And Local Version Control Tools</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            RVM : Using Distributed And Local Version Control Tools
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on May 21, 2008 by <font color="#0050B2">ianrogers</font>.
				    </div>

				    <p>Tools for Local and Distributed Version Control</p>
<ol>
	<li><a href="#UsingDistributedAndLocalVersionControlTools-UsingMercurial">Mercurial</a></li>
	<li><a href="#UsingDistributedAndLocalVersionControlTools-UsingGITtomanagealocalversionoftheJikesRVMrepository">GIT</a></li>
	<li><a href="#UsingDistributedAndLocalVersionControlTools-UseSVK">SVK</a></li>
	<li><a href="#UsingDistributedAndLocalVersionControlTools-Usedarcs">DARCS</a></li>
	<li><a href="#UsingDistributedAndLocalVersionControlTools-UseSVNMirrortoClonetheSVNRepository">SVN Mirror</a></li>
	<li><a href="#UsingDistributedAndLocalVersionControlTools-RsynctheSVNrepository">Rsync</a></li>
</ol>


<h2><a name="UsingDistributedAndLocalVersionControlTools-UsingMercurial"></a>Using Mercurial</h2>

<p>Mercurial is a distributed version control tool (similar to Git) that is a bit cleaner to use and friendlier to Windows. Both systems allow keeping track of an SVN repository. However, while Git provides support for pushing back changes to the SVN repository, Mercurial does not. With mercurial, the way to publish changes is the generate patches and apply it to the SVN repository. As you will see soon, this is not too hard to do.</p>

<p>hgsvn is a third-party tool that support Mercurial-Subversion interoperability. It is available here: <a href="http://pypi.python.org/pypi/hgsvn">http://pypi.python.org/pypi/hgsvn</a></p>

<p>Set up a clone of the JikesRVM trunk by</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ hgimportsvn &#45;r REV <a href="http://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk">http://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk</a><br/>
$ cd trunk<br/>
$ hgpullsvn<br/>
$ cd ..</p>
</div></div>
<p>This creates a directory named "trunk", which is a mercurial repository mirroring JikesRVM SVN trunk repository (starting at revision REV). It has a unique named branch "trunk". We will create a new directory "mywork" (and a separate branch "mywork") to make our changes to JikesRVM. With such a setup, the diff between the "mywork" branch and the "trunk" branch easily gives the patch to be committed to the JikesRVM Subversion trunk.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ hg clone trunk mywork<br/>
$ cd mywork<br/>
$ hg branch mywork</p>
<ol>
	<li>Do your work.</li>
	<li>Create new files using "hg add"</li>
	<li>Commit changes using "hg commit"</li>
	<li>Continue working ...</li>
</ol>
</div></div>
<p>The differences between your work and the trunk can be seen with:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ hg diff &#45;r trunk &gt; mywork.patch</p>
</div></div>
<p>It is possible that the JikesRVM trunk has in the meanwhile been updated. Get these changes by:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ cd ../trunk<br/>
$ hgpullsvn<br/>
$ cd ../mywork<br/>
$ hg pull # pulls changes from the trunk repository to this directory.<br/>
$ hg merge<br/>
$ hg commit<br/>
$ hg diff &#45;r trunk &gt; mywork.latest.patch</p>
</div></div>
<p>An unofficial mercurial mirror of the JikesRVM trunk (synced twice a day) is maintained at <a href="http://www.cs.utexas.edu/users/speedway/jikesrvm-hg/trunk">http://www.cs.utexas.edu/users/speedway/jikesrvm-hg/trunk</a> You can clone this mirror and eliminate some of the work shown above.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ hg clone <a href="http://www.cs.utexas.edu/users/speedway/jikesrvm-hg/trunk">http://www.cs.utexas.edu/users/speedway/jikesrvm-hg/trunk</a> mywork<br/>
$ cd mywork<br/>
$ hg branch mywork</p>
<ol>
	<li>Make changes and commit them<br/>
$ hg commit</li>
	<li>Synchronize with the Subversion HEAD<br/>
$ hg pull; hg merge; hg commit</li>
	<li>The changes you made against trunk can be got with<br/>
$ hg diff &#45;r trunk &gt; mywork.patch</li>
</ol>
</div></div>

<h2><a name="UsingDistributedAndLocalVersionControlTools-UsingGITtomanagealocalversionoftheJikesRVMrepository"></a>Using GIT to manage a local version of the Jikes RVM repository</h2>

<p>GIT is a distributed version control tool that allows you to set up your own clone repositories of the Jikes RVM SVN repository that people can collaboratively work in. Changes can be pushed back to the Jikes RVM SVN repository or pulled from the Jikes RVM SVN repository.</p>

<h3><a name="UsingDistributedAndLocalVersionControlTools-SetupSVNclone"></a>Set up SVN clone</h3>

<p>Set up a repository to hold a clone of the main Jikes RVM SVN repository (NB. we only set to import the trunk as bringing in everything else would be too slow):</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; mkdir jikesrvm-svn.git<br/>
&gt; cd jikesrvm-svn.git<br/>
&gt; git svn init &#45;T <a href="https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk">https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk</a></p>
</div></div>
<p>Bring in the Jikes RVM SVN (NB. you probably only want to pull in from a particular revision, if you don't specify &#45;r and a version then the whole Jikes RVM history will be pulled across which will be very slow):</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; git svn fetch &#45;r 14100</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-Createaclonedlocalpublicrepositorytoworkoff"></a>Create a cloned local public repository to work off</h3>

<p>Having a local clone of the SVN cloned repository will allow you to make branches that you can then push into the SVN clone which you can them commit back into the SVN repository:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd ..<br/>
&gt; git clone &#45;-bare jikesrvm-svn.git jikesrvm.git</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-Checkoutalocalworldtoworkin"></a>Checkout a local world to work in</h3>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; git clone jikesrvm.git myjikesrvm.git</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-Pushachangebackintoyourlocalpublicrepository"></a>Push a change back into your local public repository</h3>

<p>First do a local commit. Git requires you to add what you want to commit and then commit, the &#45;a option to commit can do these two actions together.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd myjikesrvm.git<br/>
&gt; vi ...<br/>
&gt; git commit &#45;a</p>
</div></div>
<p>You then need to push this back to local public repository:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; git push</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-PushachangefromthelocalpublicrepositorytotheSVNrepositoryclone"></a>Push a change from the local public repository to the SVN repository clone</h3>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd ../jikesrvm.git<br/>
&gt; git push &lt;path to jikesrvm-svn.git&gt; &#43;master</p>
</div></div>
<p>The master is what is being pushed, the + forces the push.</p>

<h3><a name="UsingDistributedAndLocalVersionControlTools-CommitchangesfromtheJikesRVMSVNclonebacktotheJikesRVMSVNrepository"></a>Commit changes from the Jikes RVM SVN clone back to the Jikes RVM SVN repository</h3>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd ../jikesrvm-svn.git<br/>
&gt; git svn dcommit</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-PullchangesintotheJikesRVMSVNclonefromJikesRVMSVN"></a>Pull changes into the Jikes RVM SVN clone from Jikes RVM SVN</h3>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd ../jikesrvm-svn.git<br/>
&gt; git svn dcommit</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-PushchangesfromtheJikesRVMSVNclonetothelocalpublicJikesRVMrepository"></a>Push changes from the Jikes RVM SVN clone to the local public Jikes RVM repository</h3>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd ../jikesrvm-svn.git<br/>
&gt; git push ../jikesrvm.git &#43;master</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-BringlocalrepositoryuptodatewithlocalpublicJikesRVMrepository"></a>Bring local repository up-to-date with local public Jikes RVM repository</h3>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd ../myjikesrvm.git<br/>
&gt; git pull</p>
</div></div>

<h2><a name="UsingDistributedAndLocalVersionControlTools-UseSVK"></a>Use SVK</h2>

<p>You may want to retrieve Jikes RVM, make modifications and version control your changes. Unfortunately Subversion does not natively support decentralized development model where everyone maintains their own development tree. For this you will need to use <a href="http://svk.bestpractical.com/view/HomePage">SVK</a>. SVK describes itself as "a decentralized version control system built with the robust Subversion filesystem. It supports repository mirroring, disconnected operation, history-sensitive merging, and integrates with other version control systems, as well as popular visual merge tools."</p>

<p>Note: The directions on this page were partially derived from a blog <a href="http://scottstuff.net/blog/articles/2005/07/07/distributed-development-with-svk">entry</a> by Scott Laird.</p>

<h3><a name="UsingDistributedAndLocalVersionControlTools-SettinguptheLocalRepository"></a>Setting up the Local Repository</h3>

<p>After you have downloaded and installed SVK you need to initialize a local repository and import Jikes RVM into local repository.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk depotmap &#45;-init # Initialize local repository<br/>
&gt; svk mirror <a href="https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk">https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk</a> //jikesrvm/trunk # Setup up mapping<br/>
&gt; svk sync &#45;-all # Synchronize local repository to all remote repositories</p>
</div></div>
<p>Synchronization will take a long time (Jikes RVM has a lot of history to import) and may need to be restarted if there is problems with the sourceforge servers.</p>

<h3><a name="UsingDistributedAndLocalVersionControlTools-SettingupaLocalBranch"></a>Setting up a Local Branch</h3>

<p>After the remote repository has been synchronized you can setup a local branch where you will do all your work and check out a working copy.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk cp //jikesrvm/trunk //jikesrvm/local # Setup local branch<br/>
&gt; svk co //jikesrvm/local &#126;/Research/jikesrvm # Check out local branch into directory &#126;/Research/jikesrvm</p>
</div></div>
<p>SVK differs from Subversion in that the metadata for a checkout is not stored in the directory in which the files are checked out. You will not find any files such as &#126;/Research/jikesrvm/.svk/ - instead it is stored in central location. This means that if you ever want to move around a locally checked out copy you need to run:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk co &#45;-relocate &#126;/Research/jikesrvm &#126;/Research/jikesrvm2</p>
</div></div>
<p>And if you ever need to delete a locally checked out copy you delete the physical directory and then purge the record of its existence via:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; rm &#45;rf &#126;/Research/jikesrvm2<br/>
&gt; svk co &#45;-purge</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-MakingLocalChanges"></a>Making Local Changes</h3>

<p>You can modify the files in the checked out working copy and perform all the usual "svk commit", "svk diff" commands on the source code.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd &#126;/Research/jikesrvm<br/>
&gt; vi NEWS<br/>
&gt; svk diff NEWS<br/>
&gt; svk commit &#45;m "Added a news item" NEWS</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-MergingwithUpstreamChanges"></a>Merging with Upstream Changes</h3>

<p>When changes occur in the upstream Jikes RVM subversion repository you can update your local repository via the command:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk sync //jikesrvm/trunk</p>
</div></div>
<p>And you may want to move the changes across into your local branch via:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk smerge &#45;I //jikesrvm/trunk //jikesrvm/local</p>
</div></div>
<p>And update your local branch via:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd &#126;/Research/jikesrvm<br/>
&gt; svk up</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-PreparingPatches"></a>Preparing Patches</h3>

<p>Now that you have modified your local branch you want to create a patch so that it can be integrated back into the main Jikes RVM tree. The first thing to do is create a directory that will contain the patched versions.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk mkdir //jikesrvm/patchsets</p>
</div></div>
<p>Then you create a new branch for the patched version:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk cp //jikesrvm/trunk //jikesrvm/patchsets/news_add</p>
</div></div>
<p>And merge across the changes you are interested in:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk merge &#45;l &#45;c 1234 //jikesrvm/local //jikesrvm/patchsets/news_add</p>
</div></div>
<p>Note: the &#45;l switch says to use the previous commit message as part of the new merge commit message.</p>

<p>You then check out the branch and verify your changes. By verifying your code against a clean tree you can make sure that you didn't miss any other changes in your local tree and that you didn't introduce any unintended changes. If you missed some changes you can add them directly to the branch or merge them across.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk co //jikesrvm/patchsets/news_add<br/>
&gt; cd news_add<br/>
&gt; ... RunSanityTests ...<br/>
&gt; ... svk merge any missed changes ...<br/>
&gt; ... emacs NEWS ...<br/>
&gt; ... svk commit &#45;m "Fix missed changes" ...</p>
</div></div>
<p>Finally you create a diff file and add it into the <a href="http://sourceforge.net/tracker/?group_id=128805&amp;atid=712770">patch tracker</a>.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk diff //jikesrvm/trunk //jikesrvm/patchsets/news_add &gt; news_add_diff.txt</p>
</div></div>
<p>If the main source moved further forward and you need to update your local branch you can do it via the following command. Then just retest and recreate the diff file.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk smerge &#45;I &#45;l //jikesrvm/trunk //jikesrvm/patchsets/news_add</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-ApplyingChanges"></a>Applying Changes</h3>

<p>If you are a Jikes committer and want to apply patch directly to the upstream source repository then you run:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk smerge //jikesrvm/patchsets/news_add //jikesrvm/trunk</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-MirroringLocalBranch"></a>Mirroring Local Branch</h3>

<p>Sometimes you may want to mirror a local branch into a public Subversion repository. This may be so others can look at your changes, to provide a backup or to share changes between multiple SVK repositories.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk mkdir //mirror<br/>
&gt; svk ls <a href="http://www.mysvnserver.com/svn/public/">http://www.mysvnserver.com/svn/public/</a><br/>
&lt;follow the prompts and have it mirror it onto //mirror/mymirror&gt;<br/>
&gt; svk sync //mirror/mymirror<br/>
&gt; svk mkdir //mirror/mymirror/jikesrvm<br/>
&gt; svk smerge &#45;-baseless &#45;Il //jikesrvm/ //mirror/mymirror/jikesrvm</p>
</div></div>
<p>You can update the mirror at anytime via:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svk smerge &#45;I &#45;l //jikesrvm/ //mirror/mymirror/jikesrvm</p>
</div></div>

<h2><a name="UsingDistributedAndLocalVersionControlTools-Usedarcs"></a>Use darcs</h2>

<p>While a central SVN repository is excellent for collaboration on a common code base, sometimes you wish to try things before commiting to the SVN repository. If you plan on making a lot of changes spread accross numerous files, it can be handy to have a local version control system (VCS) in which to record your changes. Similarly to the SVK setup detailed above, you can opt to use <a href="http://www.darcs.net">darcs</a>as your local version control system. Darcs is an open-source distributed VCS. This means that there is no centralized server on which the repository resides. Instead, each repository stands on its own, and changes made to one copy of the repository can be put into another copy. Basically, darcs is built around patches, that are invertible, commutable (if not there is a dependency) and mergable in any order. Because people are pretty familiar wirth SVN, a there is a page detailing the <a href="http://darcs.net/DarcsWiki/WorkFlowsVsSubversion">workflow comparison</a> between darcs and SVN.</p>

<p>The directions given here are structured alike the SVK directions.</p>

<h3><a name="UsingDistributedAndLocalVersionControlTools-SettingupaLocalRepository"></a>Setting up a Local Repository</h3>

<p>Once you have downloaded and installed darcs onto your machine, you can create the initial repository:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; cd my_jikes_source_dir<br/>
&gt; darcs init</p>
</div></div>
<p>Make sure you have only the source files in your my_jikes_source_dir directory, as we will be automatically adding all source files to the darcs repository. Darcs ignores all CVS and SVN related files, as well as a host of other so called boring files. The list of boring files is kept in the prefs/boring file in your darcs repository. Feel free to expand this list.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs record &#45;-look-for-adds</p>
</div></div>
<p>If you give no other parameters, you get the following questions</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; What is your email address? &lt;snip&gt;<br/>
&gt; addfile ./GNUmakefile<br/>
&gt; Shall I record this patch? (1/?) [ynWsfqadjkc], or ? for help: a<br/>
&gt; What is the patch name? initial checkin<br/>
&gt; Do you want to add a long comment? [yn] n</p>
</div></div>
<p>You will only be asked for your email address the first time you check someting into the repository. After the initial checkin, you end up with a &#95;darcs directory that contains all the relevant information about your repository.</p>

<h3><a name="UsingDistributedAndLocalVersionControlTools-MakingLocalChanges"></a>Making Local Changes</h3>

<p>If you edit files locally, have tested your changes (i.e., Jikes RVM at least builds), you may want to record them in your repository. First check to see that you will record what you think has been changed.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs whatsnew</p>
</div></div>
<p>If you added files in the Jikes RVM tree, you may wish to use the &#45;-look-for-adds argument to whatsnew. There are no special issues when dealing with binary files. If you are satisfied you can record the changes to all changes files (optionally using the &#45;-look-for-adds flag).</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs record</p>
</div></div>
<p>Or you can only record the changes made to one or more file, by explicitly adding them to the command line</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs record file1 file2 file3 ... fileN</p>
</div></div>
<p>You can confirm each change, or confirm them all at once, by typing a when asked to record 'this' patch. Notice that the smaller patches will be congregated into the larger patch that will get a name and (optionally) a comment in the repository. You can rollback patches, undoing them in the repository, the local copy (i.e., the working copy), or both. A list with patches you have recorded is available.</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs changes</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-MergingwithUpstreamChanges"></a>Merging with Upstream Changes</h3>

<p>If the Jikes RVM central SVN repository is changed, you use the regular SVN update to get the changes, and then you simply record the changes into the local darcs repository using</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs record &#45;m "svn update at &lt;date&gt;" &#45;-look-for-adds</p>
</div></div>

<h3><a name="UsingDistributedAndLocalVersionControlTools-PreparingPatchesandApplyingChanges"></a>Preparing Patches and Applying Changes</h3>

<p>If you wish to get a patch to the Jikes RVM team, you first update your local copy using SVN, store the changes into darcs, as described above, and basically create a SVN diff and submit the diff to the <a href="http://sourceforge.net/tracker/?group_id=128805&amp;atid=712770">patch tracker</a>.</p>

<p>If you have SVN write access to the central Jikes RVM SVN repository, you use the regular SVN command to check in your code.</p>

<h3><a name="UsingDistributedAndLocalVersionControlTools-MirroringaLocalBranch"></a>Mirroring a Local Branch</h3>

<p>Your darcs repository can be made available though HTTP or SSH. For the former, you place the &#95;darcs directory on a public HTTP server, for the latter you need to give people SSH access to the machine your repository resides on. If you wish to take a copy of your repository along, you basically have two choices. Either you copy the full Jikes RVM source tree, inclusing your &#95;darcs directory. This will allow you to keep track of the changes made in the central SVN repository while you are on the road. Or you only take your darcs repository along, relying on access to the machine on which the full Jikes RVM SVN checked out copy resides. For the latter you just 'get' your darcs repository. For the sake of clarity, we will call the machine you did all the above on the 'original_machine', and we will call the one where you want a copy on the 'road_machine'. On road_machine you</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs get original_machine:my_jikes_source_dir</p>
</div></div>
<p>If you make changes while on the road, you record them locally, on road_machine. If you wish to sync with original_machine you</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs put original_machine:my_jikes_source_dir</p>
</div></div>
<p>Suppose you have updated the working copy from the SVN repository on original_machine, and you wish these changes reflected on your road_machine, you first check the changes into darcs on the original_machine and then you</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; darcs pull original_machine:my_jikes_source_dir</p>
</div></div>
<p>The darcs repositories with which you have synched are kept in &#95;darcs/prefs/repos.</p>

<h2><a name="UsingDistributedAndLocalVersionControlTools-UseSVNMirrortoClonetheSVNRepository"></a>Use SVN Mirror to Clone the SVN Repository</h2>

<p>You can use SVN::Mirror to mirror the repository locally. You can install it via your distributions package manager or via Perl's CPAN (&lt;code&gt;perl &#45;MCPAN &#45;e shell&lt;/code&gt;) installation tool. You will need the command line interface to this called <a href="http://search.cpan.org/~clkao/SVN-Mirror-0.69_2/bin/svm">svm</a>.</p>

<p>First create a repository to hold your mirror that will be held at the location 'SVMREPOS':</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; export SVMREPOS=~/Research/jikesrvm<br/>
&gt; svnadmin create $SVMREPOS</p>
</div></div>
<p>then initialize and synchronize it to the latest repository:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svm init mirror/mymirror/jikesrvm <a href="https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk">https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/trunk</a><br/>
&gt; svm sync mirror/mymirror/jikesrvm</p>
</div></div>
<p>Synchronization will take a long time (Jikes RVM has a lot of history to import) and may need to be restarted if there is problems with the sourceforge servers. You can speed up the sync by flattening a series of changes into one larger change via:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; svm sync mirror/mymirror/jikesrvm $REVISION</p>
</div></div>
<p>where $REVISION is the current revision.</p>

<h2><a name="UsingDistributedAndLocalVersionControlTools-RsynctheSVNrepository"></a>Rsync the SVN repository</h2>

<p>The following commands will copy the Jikes RVM SVN repository to the current directory:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>&gt; export RSYNC_PROXY=rsync-svn.sourceforge.net:80<br/>
&gt; rsync &#45;a rsync-svn-j::svn/jikesrvm/&#42; .</p>
</div></div>

				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://docs.codehaus.org/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Jul 04, 2010 19:57</font></td>
		    </tr>
	    </table>
    </body>
</html>